import { request, MyRequest } from "@/plugins";
import { AxiosRequestConfig } from "axios";

export const getAssetList = <T = IManagement.ResManagementList>(
  data: any
) => MyRequest<T>({ method: "post", url: "/api/report/selectAsset", data });


export const upload = <T>(data: any, config?: AxiosRequestConfig) =>
  MyRequest<T>({
    method: "post",
    url: "/api/file/upload",
    data,
    headers: {
      "Content-Type": "multipart/form-data",
    },
    ...config,
  });


export const uploadImg = <T>(data: any, config?: AxiosRequestConfig) =>
    MyRequest<T>({
        method: "post",
        url: "/api/report/upload",
        data,
        headers: {
            "Content-Type": "multipart/form-data",
        },
        ...config,
    });
